<!--<template>-->
<!--  <a-card :bordered="false">-->
<!--    &lt;!&ndash; 查询区域 &ndash;&gt;-->
<!--    <div class="table-page-search-wrapper">-->
<!--      <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<!--        <a-row :gutter="24">-->
<!--        </a-row>-->
<!--      </a-form>-->
<!--    </div>-->
<!--    &lt;!&ndash; 查询区域-END &ndash;&gt;-->

<!--    &lt;!&ndash; 操作按钮区域 &ndash;&gt;-->
<!--    <div class="table-operator">-->
<!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!--      <a-button type="primary" icon="download" @click="handleExportXls('教师和课程表')">导出</a-button>-->
<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--        <a-button type="primary" icon="import">导入</a-button>-->
<!--      </a-upload>-->
<!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!--        <a-menu slot="overlay">-->
<!--          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!--        </a-menu>-->
<!--        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!--      </a-dropdown>-->
<!--    </div>-->

<!--    &lt;!&ndash; table区域-begin &ndash;&gt;-->
<!--    <div>-->
<!--      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!--        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
<!--        <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
<!--      </div>-->

<!--      <a-table-->
<!--        ref="table"-->
<!--        size="middle"-->
<!--        :scroll="{x:true}"-->
<!--        bordered-->
<!--        rowKey="id"-->
<!--        :columns="columns"-->
<!--        :dataSource="dataSource"-->
<!--        :pagination="ipagination"-->
<!--        :loading="loading"-->
<!--        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<!--        class="j-table-force-nowrap"-->
<!--        @change="handleTableChange">-->

<!--        <template slot="htmlSlot" slot-scope="text">-->
<!--          <div v-html="text"></div>-->
<!--        </template>-->
<!--        <template slot="imgSlot" slot-scope="text">-->
<!--          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>-->
<!--          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>-->
<!--        </template>-->
<!--        <template slot="fileSlot" slot-scope="text">-->
<!--          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>-->
<!--          <a-button-->
<!--            v-else-->
<!--            :ghost="true"-->
<!--            type="primary"-->
<!--            icon="download"-->
<!--            size="small"-->
<!--            @click="downloadFile(text)">-->
<!--            下载-->
<!--          </a-button>-->
<!--        </template>-->

<!--        <span slot="action" slot-scope="text, record">-->
<!--          <a @click="handleEdit(record)">编辑</a>-->
<!--          <a-divider type="vertical" />-->
<!--          <a-dropdown>-->
<!--            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
<!--            <a-menu slot="overlay">-->
<!--              <a-menu-item>-->
<!--                <a @click="handleDetail(record)">详情</a>-->
<!--              </a-menu-item>-->
<!--              <a-menu-item>-->
<!--                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!--                  <a>删除</a>-->
<!--                </a-popconfirm>-->
<!--              </a-menu-item>-->
<!--            </a-menu>-->
<!--          </a-dropdown>-->
<!--        </span>-->

<!--      </a-table>-->
<!--    </div>-->

<!--    <astu-teacher-course-modal ref="modalForm" @ok="modalFormOk"></astu-teacher-course-modal>-->
<!--  </a-card>-->
<!--</template>-->

<!--<script>-->

<!--  import '@/assets/less/TableExpand.less'-->
<!--  import { mixinDevice } from '@/utils/mixin'-->
<!--  import { JeecgListMixin } from '@/mixins/JeecgListMixin'-->
<!--  import AstuTeacherCourseModal from './modules/AstuTeacherCourseModal'-->
<!--  import { httpAction, postAction } from '@api/manage'-->

<!--  export default {-->
<!--    name: 'AstuTeacherCourseList',-->
<!--    mixins:[JeecgListMixin, mixinDevice],-->
<!--    components: {-->
<!--      AstuTeacherCourseModal-->
<!--    },-->
<!--    data () {-->
<!--      return {-->
<!--        description: '教师和课程表管理页面',-->
<!--        // 表头-->
<!--        columns: [-->
<!--          {-->
<!--            title: '#',-->
<!--            dataIndex: '',-->
<!--            key:'rowIndex',-->
<!--            width:60,-->
<!--            align:"center",-->
<!--            customRender:function (t,r,index) {-->
<!--              return parseInt(index)+1;-->
<!--            }-->
<!--          },-->
<!--          // { title:'教师id', align:"center", dataIndex: 'teacherId' },-->
<!--          // { title:'教师工号', align:"center", dataIndex: 'teacherNumber' },-->
<!--          // { title:'教师名称', align:"center", dataIndex: 'teacherName' },-->
<!--          // { title:'课程id', align:"center", dataIndex: 'courseId' },-->
<!--          // { title:'课程名称', align:"center", dataIndex: 'courseName' },-->
<!--          // { title:'学期时间', align:"center", dataIndex: 'termTime' },-->
<!--          // { title: '操作', dataIndex: 'action', align:"center", fixed:"right", width:147, scopedSlots: { customRender: 'action' } }-->
<!--        ],-->
<!--        url: {-->
<!--          list: "/teacher_course/astuTeacherCourse/list",-->
<!--          delete: "/teacher_course/astuTeacherCourse/delete",-->
<!--          deleteBatch: "/teacher_course/astuTeacherCourse/deleteBatch",-->
<!--          exportXlsUrl: "/teacher_course/astuTeacherCourse/exportXls",-->
<!--          importExcelUrl: "teacher_course/as  tuTeacherCourse/importExcel",-->

<!--        },-->
<!--        dictOptions:{},-->
<!--      }-->
<!--    },-->
<!--    created() {-->
<!--    },-->
<!--    computed: {-->
<!--      importExcelUrl: function(){-->
<!--        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;-->
<!--      },-->
<!--    },-->
<!--    methods: {-->
<!--      initDictConfig(){-->
<!--        }-->
<!--    }-->
<!--  }-->
<!--</script>-->
<style scoped>
@import '~@assets/less/common.less';
</style>


<template>
  <a-table :columns="columns"
           :data-source="data"
           rowKey="id"
           class="components-table-demo-nested">
    <a slot="operation" slot-scope="text">删除</a>
    <a-table
      slot="expandedRowRender"
      slot-scope="text"
      rowKey="id"
      :columns="innerColumns"
      :data-source="innerData"
      :pagination="false"
    >
      <span slot="status" slot-scope="text">
      Finished </span>
      <span slot="operation" slot-scope="text" class="table-operation">
        <a-dropdown>
          <a-menu slot="overlay">
            <a-menu-item>
              编辑
            </a-menu-item>
            <a-menu-item>
              删除
            </a-menu-item>
          </a-menu>
          <a> 更多操作 <a-icon type="down" /> </a>
        </a-dropdown>
      </span>
    </a-table>
  </a-table>
</template>
<script>
const columns = [
  { title: '教师id', dataIndex: 'teacherId', key: 'teacherId' },
  { title: '教师工号', dataIndex: 'teacherNumber', key: 'teacherNumber' },
  { title: '教师名称', dataIndex: 'teacherName', key: 'teacherName' },
  { title: '课程id', dataIndex: 'courseId', key: 'courseId' },
  { title: '课程名称', dataIndex: 'courseName', key: 'courseName' },
  { title: '学期时间', dataIndex: 'termTime', key: 'termTime' },
  { title: '操作', key: 'operation', scopedSlots: { customRender: 'operation' } },
];

const data = [];
for (let i = 0; i < 3; ++i) {
  data.push({
    key: i,
    name: 'Screem',
    platform: 'iOS',
    version: '10.3.4.5654',
    upgradeNum: 500,
    creator: 'Jack',
    createdAt: '2014-12-24 23:12:00',
  });
}

const innerColumns = [
  { title: '实验id', dataIndex: 'experimentId', key: 'experimentId' },
  { title: '实验名称', dataIndex: 'experimentName', key: 'experimentName' },
  { title: 'Status', key: 'state', scopedSlots: { customRender: 'status' } },
  { title: 'Upgrade Status', dataIndex: 'upgradeNum', key: 'upgradeNum' },
  {
    title: 'Action',
    dataIndex: 'operation',
    key: 'operation',
    scopedSlots: { customRender: 'operation' },
  },
];

const innerData = [];
for (let i = 0; i < 3; ++i) {
  innerData.push({
    key: i,
    date: '2014-12-24 23:12:00',
    name: 'This is production name',
    upgradeNum: 'Upgraded: 56',
  });
}
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import AstuTeacherCourseModal from './modules/AstuTeacherCourseModal'
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'

 export default {
  name:'AstuTeacherCourseList',
  data() {
    return {
      data:[],
      columns,
      innerColumns,
      innerData,
    };
  },
  created(){
  },
  methods: {
  },
  mounted() {
    postAction("/CourseListController/getTeacherCourseInformation").then((res)=>{
      if (res.code===200) {
        this.data=res.result.astuTeacherCourses;
        console.log(res);
      }
    })
    // postAction("/CourseListController/getEIdAndEName").then((res)=>{
    //   if (res.code===200) {
    //     console.log(res)
    //     this.innerData=res.result.objects1;
    //   }
    // })
  }

};

</script>
